import cv2
url='http://192.168.1.1:8080/?action=stream'


cap=cv2.VideoCapture(url)
ret=cap.isOpened()
ret,img=cap.read()
cv2.imwrite('photo.bmp', img)
cap.release()

